#include <Encoder.h>

Encoder sensorLeft(2, 4);
Encoder sensorRight(7, 8);

void WheelEncoderSetup()
{
	  pinMode(2, INPUT);
	  pinMode(4, INPUT);
	  pinMode(7, INPUT);
	  pinMode(8, INPUT);
    pinMode(A0, OUTPUT);
    
    digitalWrite(A0, HIGH);
}

void WheelEncoderRead()
{
  cli();
	URobotDistance.robotDistance.LeftDistance =   sensorLeft.read();
  URobotDistance.robotDistance.RightDistance =  sensorRight.read();
  sei();
}

